import request from "@/utils/request";
const BASE_URL= '/admin/system/user'
export default {
  getPageList(page, limit, searchObject) {
    return request({
      url:`${BASE_URL}/${page}/${limit}`,
      method : 'get',
      params : searchObject
    })
  },
  addUser(userObject) {
  return request({
    url:`${BASE_URL}/addUser`,
    method: 'post',
    data:userObject
  })
  },
  updateUser(userObject){
    return request({
        url:`${BASE_URL}/updateUserById`,
        method :'post',
        data: userObject
      }
    )
  },
  updateStatus(userObject){
    return request({
      url:`${BASE_URL}/updateStatus`,
      method :'post',
      data:userObject
    })
  },
  deleteByID(id) {
    return request(
      {
        url:`${BASE_URL}/delete/${id}`,
        method: 'delete',
        data:id

      }
    )
  },
}
